package com.p04.homework.test;

import com.p04.homework.bean.Television;

public class WatchTelevision {

    public static void main(String[] args) {

        Television television = new Television(2,5);
       int volume = television.getVolume();
        int channel = television.getChannel();
        System.out.println("volume="+volume+",channel="+channel);

        //修改了channel
        /*television.setChannel(100);
        System.out.println("channel="+television.getChannel());
        television.setChannel(0);
        System.out.println("channel="+television.getChannel());*/

        //修改音量volume
          television.setVolume(7);
        System.out.println("Volume="+television.getVolume());
        television.setVolume(20);
        System.out.println("Volume="+television.getVolume());



    }
}
